package dk.marten.ibdrecord;

import java.util.Calendar;

import android.text.format.DateFormat;
import android.util.Log;

public class TilstandData extends ListData {
	  
	private long id = -1;
	  private double weight;
	  private int tilstand = 8;
	  private int fatigue = 0;
	  private int smerte = 0;
	  private int stress = 0;

	  public long getId() {
	    return id;
	  }

	  public void setId(long id) {
	    this.id = id;
	  }

	  public double getWeight() {
	    return weight;
	  }

	  public void setWeight(double weight) {
	    this.weight = weight;
	  }

	  public int getTilstand() {
	    return tilstand;
	  }

	  public void setTilstand(int tilstand) {
	    this.tilstand = tilstand;
	  }

	  public int getFatigue() {
	    return fatigue;
	  }

	  public void setFatigue(int fatigue) {
	    this.fatigue = fatigue;
	  }

	  public int getSmerte() {
	    return smerte;
	  }

	  public void setSmerte(int smerte) {
	    this.smerte = smerte;
	  }

	  public int getStress() {
	    return stress;
	  }

	  public void setStress(int stress) {
	    this.stress = stress;
	  }
	  
	  public Calendar getDato() {
	    return regDato;
	  }

	  public void setDato(Calendar regDato) {
	    this.regDato = regDato;
	  }
	  
	  public TilstandData(){
		  this.regDato = Calendar.getInstance();
		  
	  }
	  
	  public TilstandData(long id,double weight, int tilstand, int fatigue, int smerte, int stress, Calendar regDato) {
		  this.id = id;
		  this.regDato = regDato;
		  tilstandData(weight, tilstand, fatigue, smerte, stress);
	  }

		public TilstandData(double weight, int tilstand, int fatigue, int smerte, int stress, Calendar regDato) {
			this.regDato = regDato;
			  tilstandData(weight, tilstand, fatigue, smerte, stress);
		}
		
		public TilstandData(double weight, int tilstand, int fatigue, int smerte, int stress) {
			  tilstandData(weight, tilstand, fatigue, smerte, stress);
		}
		
		private void tilstandData(double weight, int tilstand,int fatigue, int smerte, int stress) {
			this.weight = weight;
			this.tilstand = tilstand;
			this.fatigue = fatigue;
			this.smerte = smerte;
			this.stress = stress;
		}

	  // Will be used by the ArrayAdapter in the ListView
	  @Override
	  public String toString() {
	    return (String) DateFormat.format("dd/MM/yyyy h:mm", regDato) + ", " +id;
	  }

}
